package com.probox.common.entity.service.customer;

import com.baomidou.mybatisplus.extension.service.IService;
import com.probox.common.core.web.domain.AjaxResult;
import com.probox.common.entity.domain.customer.CustomerInfo;
import com.probox.common.entity.vo.StaticQueryVo;
import com.probox.common.entity.vo.WeCom.WeComCustomerVo;
import com.probox.common.entity.vo.customer.CustomerInfoLevelVo;
import com.probox.common.entity.vo.customer.CustomerInfoVo;
import com.probox.common.entity.vo.customer.CustomerRmfVo;
import com.probox.common.entity.vo.customer.open.CustomerFundOpenVo;
import com.probox.customer.api.domain.CustomerVo;

import java.util.Date;
import java.util.HashMap;
import java.util.List;

/**
 * 客户信息Service接口
 *
 * @author zsy
 * @date 2021-05-25
 */
public interface ICustomerInfoService extends IService<CustomerInfo> {

    /**
     * 用户行为查询:进入小程序多少次
     *
     * @return
     */
    public Integer getOpenTimesByUid(StaticQueryVo vo);

    /**
     * 用户行为查询:查询客户停留页面数据
     */
    public AjaxResult getBehavior(StaticQueryVo vo);

    /**
     * 客户余额详情
     *
     * @param customerId
     * @return
     */
    public AjaxResult myBalanceDetail(Long customerId,String businessType);

    /**
     * 计算rmf
     */
    public CustomerRmfVo getRff(Long customerId);

    public CustomerRmfVo getRmf(Long customerId);

    /**
     * 根据客户编号查询客户详情
     *
     * @param no
     * @return
     */
    public WeComCustomerVo getByWeComCustomerVoByNo(String no);

    /**
     * 企业微信段查看客户的信息
     *
     * @param customerId
     * @return
     */
    public WeComCustomerVo getByWeComCustomerVo(Long customerId);

    /**
     * 企业微信客户列表
     *
     * @param customerInfo
     * @return
     */
    public List<WeComCustomerVo> listCustomerByStoreId(CustomerInfoVo customerInfo);

    /**
     * 模糊查询手机号
     *
     * @param phone
     * @return
     */
    public List<CustomerInfo> listPhone(String phone);

    public List<CustomerInfo> listByCity(List<String> citys, List<Long> customerIds);

    public List<CustomerInfo> listByBirthday(List<String> citys);

    /**
     * 根据手机号查询客户名称
     *
     * @param phone
     * @return
     */
    public CustomerInfoVo getName(String phone);

    /**
     * 查询客户信息
     *
     * @param customerUid 客户信息ID
     * @return 客户信息
     */
    public AjaxResult selectCustomerInfoById(Long customerUid);


    /**
     * 查询客户信息列表
     *
     * @param customerInfo 客户信息
     * @return 客户信息集合
     */
    public List<CustomerInfoLevelVo> queryList(CustomerInfoVo customerInfo);


    /**
     * 新增客户信息
     *
     * @param customerInfoVo 客户信息
     * @return 结果
     */
    public boolean insertCustomerInfo(CustomerInfoVo customerInfoVo);

    /**
     * 修改客户信息
     *
     * @param customerInfoVo 客户信息
     * @return 结果
     */
    public boolean updateCustomerInfo(CustomerInfoVo customerInfoVo);

    /**
     * 批量删除客户信息
     *
     * @param customerUids 需要删除的客户信息ID
     * @return 结果
     */
    public boolean deleteCustomerInfoByIds(Long[] customerUids);


    public String importUser(List<CustomerInfo> customerInfoList, String password);

    /**
     * 查询客户信息
     *
     * @param customerId
     * @return
     */
    public CustomerVo getCustomerVo(Long customerId);

    public CustomerInfo getCustomerByPhone(String phone);

    public CustomerVo getNewCustomerVo(Long customerId);

    /**
     * 根据客户id查询客户详情
     *
     * @param customerId
     * @return
     */
    public HashMap getCustomerInfoDetail(Long customerId);

    /**
     * 更新用户信息
     */
    public Object editCustomerInfo(CustomerInfo customerInfo);


    public CustomerFundOpenVo geCustomerFundInfo();

    /**
     * 查询当前客户粉丝详细
     */
    public List<CustomerInfo> getFansDetail();

    public List<CustomerInfo> getRmfCustomerList();

    public Integer getFansDetailCount();

    public List<CustomerInfoVo> getCustomerInfoByids(Long[] customerUids);

    /**
     * 查看分享者小程序码
     *
     * @param customerUid
     * @return
     */
    public String getSharecustomerQrCode(Long customerUid);

    List<CustomerInfoLevelVo> queryListSelf(CustomerInfoVo customerInfo);
}
